package test1;

import java.util.Scanner;

public class main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入原字符串：");
        String a = sc.next();
        System.out.println("请输入转后的字符串");
        String b = sc.next();
        System.out.println(can(a,b));
    }
    public static  boolean can(String a,String b){
        for (int i = 0; i <a.length() ; i++) {
            a=ado(a);
            if(a.equals(b)){
                return  true;
            }
        }
        return false;
    }

    public static String ado(String a) {
       char op=a.charAt(0);
       String str=a.substring(1);
        return str+op;
    }
}
